package com.leinao.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 *
 * 配置环境变量
 *
 * @author  wangshoufa 
 * @date 2018年10月24日 上午9:10:05
 *
 */
@RefreshScope
@Component
public class EnvironmentConfig {

	/**
	 * token在Redis中的前缀
	 */
	@Value("${remote.prefix}")
	private String prefix;
	
	/**
	 * 登录过期时间，单位:s
	 */
	@Value("${remote.expireSeconds}")
	private Integer expireSeconds;

	/**
	 * Redis host
	 */
	@Value("${spring.redis.host}")
    private String host;

	/**
	 * Redis port
	 */
    @Value("${spring.redis.port}")
    private Integer port;

	/**
	 * Redis password
	 */
    @Value("${spring.redis.password}")
    private String password;

	/**
	 * Redis timeout
	 */
    @Value("${spring.redis.timeout}")
    private Integer timeout;

	/**
	 * Redis max-idle
	 */
    @Value("${spring.redis.pool.max-idle}")
    private Integer maxIdle;

	/**
	 * Redis max-wait
	 */
    @Value("${spring.redis.pool.max-wait}")
    private Long maxWaitMillis;
    
    /**
	 * database driver
	 */
	@Value("${jdbc.driverClassName}")
	private String jdbc_driverClassName;

	/**
	 * database url
	 */
	@Value("${jdbc.url}")
	private String jdbc_url;

	/**
	 * database username
	 */
	@Value("${jdbc.username}")
	private String jdbc_username;

	/**
	 * database password
	 */
	@Value("${jdbc.password}")
	private String jdbc_password;

	/**
	 * 数据集路径
	 */
	@Value("${images.path}")
	private String imagesPath;

	/**
	 * 数据集域名
	 */
	@Value("${images.domain}")
	private String imagesDomain;

	/**
	 * dockerfile路径
	 */
	@Value("${dockerfile.path}")
	private String dockerfilePath;

	/**
	 * SSH登录用户
	 */
	@Value("${ssh.user}")
	private String sshUser;

	/**
	 * SSH登录密码
	 */
	@Value("${ssh.pwd}")
	private String sshPwd;

	/**
	 * SSH登录地址
	 */
	@Value("${ssh.host}")
	private String sshHost;

	/**
	 * SSH登录接口
	 */
	@Value("${ssh.port}")
	private Integer sshPort;


	public String getPrefix() {
		return prefix;
	}

	public Integer getExpireSeconds() {
		return expireSeconds;
	}

	public String getHost() {
		return host;
	}

	public Integer getPort() {
		return port;
	}

	public String getPassword() {
		return password;
	}

	public Integer getTimeout() {
		return timeout;
	}

	public Integer getMaxIdle() {
		return maxIdle;
	}

	public Long getMaxWaitMillis() {
		return maxWaitMillis;
	}

	public String getJdbc_driverClassName() {
		return jdbc_driverClassName;
	}

	public void setJdbc_driverClassName(String jdbc_driverClassName) {
		this.jdbc_driverClassName = jdbc_driverClassName;
	}

	public String getJdbc_url() {
		return jdbc_url;
	}

	public void setJdbc_url(String jdbc_url) {
		this.jdbc_url = jdbc_url;
	}

	public String getJdbc_username() {
		return jdbc_username;
	}

	public void setJdbc_username(String jdbc_username) {
		this.jdbc_username = jdbc_username;
	}

	public String getJdbc_password() {
		return jdbc_password;
	}

	public void setJdbc_password(String jdbc_password) {
		this.jdbc_password = jdbc_password;
	}

	public String getImagesPath() {
		return imagesPath;
	}

	public void setImagesPath(String imagesPath) {
		this.imagesPath = imagesPath;
	}

	public String getImagesDomain() {
		return imagesDomain;
	}

	public void setImagesDomain(String imagesDomain) {
		this.imagesDomain = imagesDomain;
	}

	public String getDockerfilePath() {
		return dockerfilePath;
	}

	public void setDockerfilePath(String dockerfilePath) {
		this.dockerfilePath = dockerfilePath;
	}

	public String getSshUser() {
		return sshUser;
	}

	public void setSshUser(String sshUser) {
		this.sshUser = sshUser;
	}

	public String getSshPwd() {
		return sshPwd;
	}

	public void setSshPwd(String sshPwd) {
		this.sshPwd = sshPwd;
	}

	public String getSshHost() {
		return sshHost;
	}

	public void setSshHost(String sshHost) {
		this.sshHost = sshHost;
	}

	public Integer getSshPort() {
		return sshPort;
	}

	public void setSshPort(Integer sshPort) {
		this.sshPort = sshPort;
	}

}
